﻿<!DOCTYPE html>
<!--隐患记录查看-->
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <style>
        .el-dialog__body {
            height: 100% !important;
        }

        .el-dialog.is-fullscreen {
            overflow: hidden !important;
        }
        body {
            padding-bottom: 10px;
        }
    </style>
    <style>

        /*说明：
         由于mystyle.css中162行.el-form-item__content {line-height: normal!important;}导致的
         index.css中.el-form-item--mini .el-form-item__content, .el-form-item--mini .el-form-item__label{    line-height: 28px;}失效
         但出于无法修改样式表的情况，所以在该页面添加以下样式，以保证页面内标题和内容不偏离
        */
        .el-form-item--mini .el-form-item__content, .el-form-item--mini .el-form-item__label {
            line-height: 28px !important;
        }
    </style>
</head>
<body>
    <div id="app" v-cloak class="popupW100">
        <el-form :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="100px" size="mini" label-position="right">
            <el-row>
                <el-col :span="11">
                    <el-col>
                        <div class="elst-select-mini">
                            <el-form-item :label="RisksManagement.RiskReport.Discoverer+mark.m" class="inputTextarea">
                                {{Form.Discoverer}}
                            </el-form-item>
                        </div>
                    </el-col>
                </el-col>
                <el-col :span="11" offset="2">
                    <el-col>
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-form-item :label="RisksManagement.RiskReport.OrganizationType+mark.m" class="inputTextarea">
                                    {{getDicValue('OrganizationType',Form.OrganizationType)}}
                                </el-form-item>
                            </el-form-item>
                        </div>
                    </el-col>
                </el-col>

            </el-row>
            <el-row>
                <el-col :span="11">
                    <el-col>
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-form-item :label="RisksManagement.RiskReport.DiscoveryTime+mark.m" class="inputTextarea">
                                    {{Form.DiscoveryTime}}

                                </el-form-item>
                            </el-form-item>
                        </div>
                    </el-col>
                </el-col>
                <el-col :span="11" offset="2">
                    <el-col>
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-form-item :label="RisksManagement.RiskReport.InspectType+mark.m" class="inputTextarea">
                                    {{getDicValue('InspectType',Form.InspectType)}}
                                </el-form-item>
                            </el-form-item>
                        </div>
                    </el-col>
                </el-col>

            </el-row>

            <el-row>
                <el-col :span="11">
                    <el-col>
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-form-item :label="RisksManagement.RiskReport.RiskType+mark.m" class="inputTextarea">
                                    {{getDicValue('RiskType',Form.RiskType)}}
                                </el-form-item>
                            </el-form-item>
                        </div>
                    </el-col>
                </el-col>
                <el-col :span="11" offset="2">
                    <el-col>
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-form-item :label="RisksManagement.RiskReport.RiskLevel+mark.m" class="inputTextarea">
                                    {{getDicValue('RiskLevel',Form.RiskLevel)}}
                                </el-form-item>
                            </el-form-item>
                        </div>
                    </el-col>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="11">
                    <el-col>
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-form-item :label="RisksManagement.MajorRiskDossier.MajorRiskDossier+mark.m" class="inputTextarea">
                                    <el-link :underline="false" @click="OpenMajorRiskDossier" type="primary" style="font-size: 14px;color:#409eff;cursor:pointer;">{{RisksManagement.MajorRiskDossier.MajorRiskDossier}}名称</el-link>
                                </el-form-item>
                            </el-form-item>
                        </div>
                    </el-col>
                </el-col>
                <!--<el-col :span="5" offset="19">
                    <el-link :underline="false" @click="OpenMajorRiskDossier" type="primary" style="font-size: 14px;color:#409eff;cursor:pointer;">{{RisksManagement.MajorRiskDossier.MajorRiskDossier}}</el-link>
                </el-col>-->
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-form-item :label="RisksManagement.RiskReport.RiskDescription+mark.m" class="inputTextarea">
                        {{Form.RiskDescription}}
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">

                    <el-form-item :label="RisksManagement.RiskReport.BeforeRectificationImg+mark.m" prop="BeforeRectificationImg" class="inputTextarea" style="position:relative;">



                        <div v-for="src in Form.BeforeRectificationImg" style="float:left;margin-right:5px;" class="ImgBox">
                            <el-image :src="src.Img" fit="fill" width="200" height="100">
                            </el-image>
                        </div>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row type="flex" justify="end">
                <el-form-item>
                    <el-button type="primary" @click="parent.ListItem.dialogVisible=false">{{col.btnBack}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
        <el-dialog :title="RisksManagement.MajorRiskDossier.MajorRiskDossier" :visible.sync="ListItem.dialogVisible" width="80%" height="80%" top="10vh"  fullscreen="true">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">

        app = new Vue({
            el: '#app',
            data: {
                //父业传参
                id: '123',
                mydata: myTree,
                ListItem: ListItem,
                //业务表单内容
                Form: {
                    id: guidEmpty,
                    Discoverer: '',
                    DiscoveryTime: '',
                    OrganizationType: '',
                    InspectType: '',
                    RiskType: '',
                    RiskLevel: '',
                    RiskDescription: '',
                    BeforeRectificationImg: [],
                },
                OrganizationType: [],
                InspectType: [],
                RiskType: [],
                RiskLevel: [],
                //表单验证
                rules: {

                }
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                OpenMajorRiskDossier: function () {
                    var id = '123';
                    this.ListItem.InputUrl = "MajorRisk/MajorRiskDossierInput.html?type=ck&id=" + id + "&t=" + Date.parse(new Date());
                    this.ListItem.dialogVisible = true;
                },
                getDicValue: function (type,value) {
                    switch (type) {

                        case "OrganizationType":
                            return getDicValue('103', value)
                            break;
                        case "InspectType":
                            return getDicValue('101', value)
                            break;
                        case "RiskType":
                            return getDicValue('100', value)
                            break;
                        case "ReportType":
                            return getDicValue('102', value)
                            break;
                        case "RiskLevel":
                            return getDicValue('03', value)
                            break;
                        default:
                            return value; break;
                    }
                },
                getData: function () {
                    getData(this, '/api/RiskRecordView/get');
                }
            },
            mounted: function () {
                this.getData();
                if (!this.id) {
                    this.Form.Discoverer = Mock.Random.cname();
                }
            }
        });
    </script>
</body>

</html>